package org.millioncall.yueyoga.common.utils;

import java.util.Collection;

/**
 * 字符串连接工具类
 * 
 * @author zangjinyu
 * 
 */
public final class JoinUtils {

	public static <T> String join(Collection<T> items) {
		StringBuilder sb = new StringBuilder();
		for (T t : items) {
			if(t!=null){
				sb.append(t.toString() + ",");
			}
		}
		String rtn = sb.toString();
		if (rtn.length() > 0) {
			rtn = rtn.substring(0, rtn.length() - 1);
		}
		return rtn;
	}
}
